#!/usr/bin/env python
"""
Created on 26 janv. 2010

@author: menez

Example: simple cos plot.
Show how to make and save a simple cosinus plot with labels, title and grid
"""

import numpy
import matplotlib.pylab as pylab
 
if __name__ == '__main__':
    print 'Affichage d\'une sinusoide'

    t = numpy.arange(0.0, 1.0+0.01, 0.01)
    print type(t)
    print t
    s = numpy.cos(2*numpy.pi*t)
    print type(s)
    print s
    pylab.plot(t,s)
    
    
    pylab.xlabel('time (s)')
    pylab.ylabel('voltage (mV)')
    pylab.title('About as simple as it gets, folks')
    pylab.grid(True)
    pylab.savefig('simple_plot')

    pylab.show()